diff options
Diffstat (limited to 'frontend/app/drive/[...path]')
| -rw-r--r-- | frontend/app/drive/[...path]/page.tsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/frontend/app/drive/[...path]/page.tsx b/frontend/app/drive/[...path]/page.tsx index 75a1bb1..60c2cca 100644 --- a/frontend/app/drive/[...path]/page.tsx +++ b/frontend/app/drive/[...path]/page.tsx | |||
| @@ -2,7 +2,8 @@ import { Drive_ls, Drive_basename, Drive_parent } from "@/lib/drive" | |||
| 2 | import { formatSize } from "@/lib/utils" | 2 | import { formatSize } from "@/lib/utils" |
| 3 | import Link from "next/link" | 3 | import Link from "next/link" |
| 4 | import { cookies } from 'next/headers'; | 4 | import { cookies } from 'next/headers'; |
| 5 | import { Auth_get_user } from "@/lib/auth"; | 5 | import { Auth_get_user, Auth_user_can_upload } from "@/lib/auth"; |
| 6 | import FileUpload from "@/components/FileUpload" | ||
| 6 | 7 | ||
| 7 | interface DrivePageProps { | 8 | interface DrivePageProps { |
| 8 | params: Promise<{ | 9 | params: Promise<{ |
| @@ -130,6 +131,13 @@ export default async function DrivePage({ params }: DrivePageProps) { | |||
| 130 | </table> | 131 | </table> |
| 131 | </div> | 132 | </div> |
| 132 | </div> | 133 | </div> |
| 134 | |||
| 135 | {/* File Upload Component */} | ||
| 136 | {Auth_user_can_upload(user) && ( | ||
| 137 | <FileUpload | ||
| 138 | targetPath={fullPath} | ||
| 139 | /> | ||
| 140 | )} | ||
| 133 | </div> | 141 | </div> |
| 134 | </div> | 142 | </div> |
| 135 | ) | 143 | ) |
